<template>
    <div class="list">
        <AppVideoItem v-for="item in list" :key="item.id" :video="item"/>
    </div>
</template>

<script setup lang="ts">
import AppVideoItem from '@/components/app-video-item.vue'
import { ref } from 'vue'
import axios from 'axios'
import { IVideoItem } from '@/views/Video/types'

const list = ref<IVideoItem[]>([])
axios({
    method: 'get',
    url: '/videosList'
}).then(({ data }) => {
    console.log(data.result)
    list.value = data.result
})
</script>

<style scoped lang="less">
.list {
    display: flex;
    flex-wrap: wrap;
    padding:0 1vw;
}
</style>